package day05;
 import java.util.Arrays;

 public class Test04 {
   public static void main(String[] args) {
     System.out.println("Hello Test04!");
     int a = 10;
     int b = a;
     System.out.println(a); // 10
     System.out.println(b); // 10
     a = 20;
     System.out.println(a); // 20
     System.out.println(b); // 10
     int[] arr1 = new int[] { 1, 2, 3 };
     int[] arr2 = arr1;
     System.out.println(arr1[0]); // 1
     System.out.println(arr2[0]); // 1
     arr1[0] = 100;
     System.out.println(arr1[0]); // 100
     System.out.println(arr2[0]); // 100
     int[] array = { 1, 3, 5, 2, 6, 8 };
     System.out.println(Arrays.toString(array));
     Arrays.sort(array);
     System.out.println(Arrays.toString(array));
     // 二分查找
     int index = Arrays.binarySearch(array, 100);
     System.out.println(index);
     // 数组元素填充
     Arrays.fill(array, 100);
     System.out.println(Arrays.toString(array));
   }
 }